package com.chucang.shucang.ttp.controller;

import com.chucang.shucang.common.base.utils.R;
import com.chucang.shucang.ttp.feign.vo.RealNameAuthVO;
import com.chucang.shucang.ttp.service.RealNameAuthService;
import com.chucang.shucang.ttp.vo.RealNameAuthResVO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author flitsneak
 * @email flitsneak@gmail.com
 * @date 2022/10/6 22:41
 * @description
 */
@RestController
@RequestMapping("/realnameauth")
@RequiredArgsConstructor
public class RealNameAuthController {

    private final RealNameAuthService realNameAuthService;

    @PostMapping("/doAuth")
    public R<RealNameAuthResVO> doAuth(@Valid @RequestBody RealNameAuthVO realNameAuthVO) {
        RealNameAuthResVO realNameAuthResVO = realNameAuthService.doAuth(realNameAuthVO);
        return R.ok(realNameAuthResVO);
    }
}
